package alipay

import (
	"context"

	"gitee.com/wosylf/ltool"
)

var (
	ctx = context.Background()
)

func (a *Client) F静默登陆(code string) (aliRsp *SystemOauthTokenResponse, err error) {
	bm := make(ltool.BodyMap)
	bm.Set("grant_type", "authorization_code")
	bm.Set("code", code)
	//bm.Set("appid", weicode.Code)
	//plug.F打印并且发送消息("appid,code:", weicode.Code, client.AppId)
	// 发起请求
	aliRsp, err = a.SystemOauthToken(ctx, bm)
	return
}
